package com.wasu.sdk_ott.provider

import android.provider.BaseColumns

/**
 * <p>------------------------------------------------------
 * <p>Copyright (C) 2020 wasu company, All rights reserved.
 * <p>------------------------------------------------------
 * <p> 本地数据库语句
 * <p>
 *
 * @author Created by zhangmz
 * @date on 2023/9/4
 */

//////////////////////////////// 频道收藏 //////////////////////////////

/**
 * 收藏表名
 */
const val FAVORITES_DB_TABLE = "favorites"

const val FAVORITES_DB_ID = BaseColumns._ID
const val FAVORITES_DB_CHID = "chid"
const val FAVORITES_DB_ISFAVORITE = "isfavorite"
const val FAVORITES_DB_DATE = "date"

/**
 * 频道收藏，创建表
 */
const val LIVE_DB_FAVORITES = "create table $FAVORITES_DB_TABLE " +
        "(" +
        "$FAVORITES_DB_ID integer primary key autoincrement, " +
        "$FAVORITES_DB_CHID text, " +
        "$FAVORITES_DB_ISFAVORITE integer DEFAULT 0, " +
        "$FAVORITES_DB_DATE long" +
        ");"

//////////////////////////////// 节目单预约 //////////////////////////////

/**
 * 预约表名
 */
const val RESERVATION_DB_TABLE = "shedualedit"

const val RESERVATION_DB_ID = BaseColumns._ID
const val RESERVATION_DB_CHID = "chid"
const val RESERVATION_DB_CHNAME = "chname"
const val RESERVATION_DB_STARTDATE = "startdate"
const val RESERVATION_DB_ENDDATE = "enddate"
const val RESERVATION_DB_EDIT = "edit"

/**
 * 节目单预约，创建表
 */
const val LIVE_DB_RESERVATION = "create table $RESERVATION_DB_TABLE " +
        "(" +
        "$RESERVATION_DB_ID integer primary key autoincrement, " +
        "$RESERVATION_DB_CHID text, " +
        "$RESERVATION_DB_CHNAME text, " +
        "$RESERVATION_DB_STARTDATE long, " +
        "$RESERVATION_DB_ENDDATE long, " +
        "$RESERVATION_DB_EDIT text" +
        ");"

//////////////////////////////// 分组频道节目单版本号 //////////////////////////////

/**
 * 分组频道节目单版本号保存，表名
 */
const val VERSION_DB_TABLE = "livedataversion"

const val VERSION_DB_ID = BaseColumns._ID
const val VERSION_DB_INTERFACE = "interface"
const val VERSION_DB_VERSION_NUM = "versionNumber"

/**
 * 分组频道节目单版本号，创建表
 */
const val LIVE_DB_LIVE_VERSION = "create table $VERSION_DB_TABLE " +
        "(" +
        "$VERSION_DB_ID integer primary key autoincrement, " +
        "$VERSION_DB_INTERFACE text, " +
        "$VERSION_DB_VERSION_NUM integer default 0" +
        ");"
